package cn.liontalk.SinglePattern.pattern1;

import java.util.ArrayList;
import java.util.List;

public class GeneralTest {

    public static void main(String[] args) {
        List<General> list = new ArrayList<>();
        for (int soldiers = 0; soldiers < 5; soldiers++) {
            General general = General.getInstance();
            general.command();
            list.add(general);
        }
        if (list.get(1) == list.get(2)) {
            System.out.println("==============相等===============");
        } else {
            System.out.println("==============不相等===============");

        }
    }
}
